package StringExercise;
//根据位置找字符
public class CharAtDemo1 {
    public static void main(String[] args) {
        String str1="thinking in java";
        char a=str1.charAt(5);
        System.out.println(a);


        String star2="abcdefg  hijk";
        int b=(int)(Math.random()*13);
        System.out.println(b);
        char c=star2.charAt(b);
        System.out.println(c);

    }
}
